package jgl.vajra.management.part.login.contract;

import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.management.bean.LoginInfoBean;
import jgl.vajra.management.databinding.ActivityLoginBinding;
import jgl.vajra.management.widget.bean.BaseRequestData;
import jgl.vajra.management.widget.mvvm.model.BaseModel;
import jgl.vajra.management.widget.mvvm.view.BaseMVVMView;
import jgl.vajra.management.widget.mvvm.viewmodel.BaseViewModel;

public class LoginContract {

    public abstract static class Model extends BaseModel {
        public abstract Observable<String> getAESSecretKey();

        public abstract Observable<BaseRequestData<String>> getVerifyCode(Map<String, Object> map);

        public abstract Observable<LoginInfoBean> onLogin(Map<String, Object> map);
    }

    public interface View extends BaseMVVMView {

        void onDismiss();

        void onVerifyCode();

        void onLogin();

        void onJoiningRequirements();

        void returnAESSecretKeySuccess(String secretKey);

        void returnLoginPasswordSuccess(LoginInfoBean data);

        void returnVerifyCodeData(int code);
    }

    public abstract static class ViewModel extends BaseViewModel<View, ActivityLoginBinding, Model> {
        public abstract void getAESSecretKey();

        public abstract void getVerifyCode(Map<String, Object> map);

        public abstract void onLogin(Map<String, Object> map);
    }
}
